home *** CD-ROM | disk | FTP | other *** search
/ Chip 2005 August (Alt) / CHIP 2005-08.1.iso / program / guvenlik / syslinux-3.07.exe / memdisk / memcpy.S < prev    next >
Encoding:
Text File  |  2003-04-15  |  404 b   |  30 lines

  1. # $Id: memcpy.S,v 1.1 2003/04/15 19:31:04 hpa Exp $
  2. #
  3. # memcpy.S
  4. #
  5. # Simple memcpy() implementation
  6. #
  7.  
  8.     .text
  9.     .globl memcpy
  10.     .type memcpy, @function
  11. memcpy:
  12.     cld
  13.     pushl %edi
  14.     pushl %esi
  15.     movl 12(%esp),%edi
  16.     movl 16(%esp),%esi
  17.     movl 20(%esp),%eax
  18.     movl %eax,%ecx
  19.     shrl $2,%ecx
  20.     rep ; movsl
  21.     movl %eax,%ecx
  22.     andl $3,%ecx
  23.     rep ; movsb
  24.     movl 12(%esp),%eax
  25.     popl %esi
  26.     popl %edi
  27.     ret
  28.  
  29.     .size memcpy,.-memcpy
  30.